//
// Created by 11510 on 2024/6/18.
//

#ifndef DEMO2_LINE_H
#define DEMO2_LINE_H
#include "Point.h"
#include <cmath>

class Line {
private:
    Point _point1;
    Point _point2;

public:
    Line(int x1, int y1, int x2, int y2):
            _point1(x1, y1), _point2(x2, y2){

    }

    double distance()const{
        double deltaX = _point1._ix - _point2._ix;
        double deltaY = _point1._iy - _point2._iy;
        return sqrt(deltaX * deltaX + deltaY * deltaY);
    }
};


#endif //DEMO2_LINE_H
